package com.yzqp.serverorder.controller;

import com.yzqp.serverorder.server.OrderServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {

    @Autowired
    OrderServer orderServer;

    @GetMapping("addOrder")
    public String updateStock(@RequestParam(value = "count") Integer count, @RequestParam(value = "id") Integer id){

        String s = orderServer.addOrder(id, count);
        return s;
    }
}
